<%@page import="cn.kgcnews.pojo.NewsDetail"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>EL表达式</title>
  </head>
  
  <body>
     <%
         request.setAttribute("userName", "jack");
         session.setAttribute("userName", "tom");
         application.setAttribute("userName", "lili");
         NewsDetail news=new NewsDetail();
         news.setTitle("今天学习EL和JSTL");
         pageContext.setAttribute("newsDetial",news);
         List<String> list=new ArrayList<String>();
         list.add("考试");
         list.add("顺利");
         session.setAttribute("list", list);
         application.setAttribute("app", "application作用域");
     %>
     <!--page request sessoin application  -->
     <h1>${sessionScope.userName}</h1>
     <h1>新闻标题：${newsDetial.title}</h1>
     <h1>${list[0]}，${list[1]}</h1>
     <h1>${app }</h1>
     <h1>${3+2}</h1>
     <h1>${1>2}</h1>
     <h1>${1>2?"OK":"FALSE"}</h1>
     <h1>${empty name}</h1>
     <h1>${5 eq 5}</h1>
     
     
     
     <a href="el2.jsp" target="_blank">el2.jsp</a>
    
    
    
    
  </body>
</html>
